package com.locki.execDDL.service;

/**
 * 数据源实体类
 * 
 * @author locki
 *
 */
public class DataSource {
	// ID
	private String id;
	// 名称
	private String name;
	// 连接ip
	private String ip;
	// 数据库端口
	private String dbport;
	// 连接数据库
	private String database;
	// 数据库用户名
	private String dbUsername;
	// 数据库密码
	private String dbPassword;
	// ssh端口
	private String sshport;
	// ssh用户名
	private String sshUsername;
	// ssh密码
	private String sshPassword;
	// 状态
	private String status;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getDbport() {
		return dbport;
	}

	public void setDbport(String dbport) {
		this.dbport = dbport;
	}

	public String getDatabase() {
		return database;
	}

	public void setDatabase(String database) {
		this.database = database;
	}

	public String getDbUsername() {
		return dbUsername;
	}

	public void setDbUsername(String dbUsername) {
		this.dbUsername = dbUsername;
	}

	public String getDbPassword() {
		return dbPassword;
	}

	public void setDbPassword(String dbPassword) {
		this.dbPassword = dbPassword;
	}

	public String getSshport() {
		return sshport;
	}

	public void setSshport(String sshport) {
		this.sshport = sshport;
	}

	public String getSshUusername() {
		return sshUsername;
	}

	public void setSshUsername(String sshUsername) {
		this.sshUsername = sshUsername;
	}

	public String getSshPassword() {
		return sshPassword;
	}

	public void setSshPassword(String sshPassword) {
		this.sshPassword = sshPassword;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMethod() {
		return "1".equals(this.status) ? "直连" : "SSH";
	}

	@Override
	public String toString() {
		return "DataSource [id=" + id + ", name=" + name + ", ip=" + ip + ", dbport=" + dbport + ", database="
				+ database + ", dbuUsername=" + dbUsername + ", dbPassword=" + dbPassword + ", sshport=" + sshport
				+ ", sshUsername=" + sshUsername + ", sshPassword=" + sshPassword + ", status=" + status + "]";
	}
}
